<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../../print.css" type="text/css" media="print">
<meta content="RubberBandCtrl,com.google.maps.extras.rubberbandctrl.RubberBandCtrl,disable,enable,setLeftHandedKeyCodes,setPanIncrement,setRightHandedKeyCodes,setRubberBandColor,setRubberBandThickness" name="keywords">
<title>com.google.maps.extras.rubberbandctrl.RubberBandCtrl</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'RubberBandCtrl - API Documentation';
				var baseRef = '../../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../index-list.html')" href="../../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../../index.html?com/google/maps/extras/rubberbandctrl/RubberBandCtrl.html&amp;com/google/maps/extras/rubberbandctrl/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;RubberBandCtrl</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class RubberBandCtrl"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.google.maps.extras.rubberbandctrl</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class RubberBandCtrl</td>
</tr>
</table>
<p></p>
 The RubberBandCtrl class works with <em>Google Maps API for Flash</em> to
 provide a user with an efficient way to zoom in to a specific area on the
 map. This class also offers convenient keyboard shortcuts (with support for
 left and right-handed users) to rewind to previous map views, zoom out, as
 well as pan in any of four directions.
  <p>
 To zoom in to a specific area on the map, a user would normally click the
 map and drag it to its desired center point, and then move the mouse to the
 upper-left corner of the map to select the appropriate zoom level (a few
 tries might be necessary to get the right fit). RubberBandCtrl provides
 a more direct way to perform this task, as described below:
 <ul>
 <li>Hold a <em>Shift</em> key (the cursor changes to a cross).</li>
 <li>Click and hold the left mouse button to anchor the rubber band to the map.</li>
 <li>Drag the mouse to stretch the rubber band.</li>
 <li>Release the mouse button to snap the map to the area enclosed by the
 rubber band, or release the <em>Shift</em> key to cancel.</li>
 </ul>
 </p>
  <p>
 The <em>Shift</em> key can also be used in conjunction with any of the keys
 below to perform other kinds of map navigation:
  <table>
 <tr><th>Left-hand<br/>Key</th><th>Right-hand<br/>Key</th><th>Action</th></tr>
 <tr><td>?</td><td>Z</td><td>Zoom out one level</td></tr>
 <tr><td>{</td><td>Q</td><td>Rewind to previous map view</td></tr>
 <tr><td>:</td><td>A</td><td>Pan left</td></tr>
 <tr><td>"</td><td>S</td><td>Pan right</td></tr>
 <tr><td>L</td><td>D</td><td>Pan up</td></tr>
 <tr><td>&gt;</td><td>X</td><td>Pan down</td></tr>
 </table>
 </p>
  <p>
 <strong>Notes:</strong>&#xA0;
 <ul>
 <li>RubberBandCtrl is active only when the map has keyboard focus, which might require the user to first click the map.</li>
 <li>Adobe Flash security policy disables RubberBandCtrl when the map is in full-screen mode.</li>
 </ul>
 </p>
  <p>
 <strong>Contacts:</strong>
 <ul>
 <li>To contact the author of RubberBandCtrl, email kevin.macdonald AT thinkwrap DOT com</li>
 <li>Visit <code>http://www.spatialdatabox.com</code> for other Google Flash Map demos and related information.</li>
 <li>For updates to RubberBandCtrl, please visit <code>http://code.google.com/p/gmaps-utility-library-flash</code></li>
 </ul>
 </p>
  <p>
 <strong>Copyright Notice:</strong><br>
 <br>
 Copyright 2009 Kevin Macdonald<br>
 <br>
 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at<br>
 <br>
     http://www.apache.org/licenses/LICENSE-2.0<br>
 <br>
 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.<br>
 </p>
 <p></p>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#RubberBandCtrl()">RubberBandCtrl</a>()</div>
<div class="summaryTableDescription">
 Creates an empty rubber band control object, which must be assigned to a Google Map via <code>enable ()</code>.</div>
</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#disable()">disable</a>():void</div>
<div class="summaryTableDescription">
 Remove RubberBandCtrl functionality from a Google Map.</div>
</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#enable()">enable</a>(googleMap:Map):void</div>
<div class="summaryTableDescription">
 Call this method once, ideally within the MapEvent.MAP_READY handler, to add
 RubberBandCtrl functionality to a Google Map.</div>
</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setLeftHandedKeyCodes()">setLeftHandedKeyCodes</a>():void</div>
<div class="summaryTableDescription">
 Set key codes for left handed users, who operate the mouse with the left
 hand, and keyboard with the right.</div>
</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setPanIncrement()">setPanIncrement</a>(pixels:int):void</div>
<div class="summaryTableDescription">
 Set the size, in pixels, for a keyboard initiated pan of the map.</div>
</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setRightHandedKeyCodes()">setRightHandedKeyCodes</a>():void</div>
<div class="summaryTableDescription">
 Set key codes for right handed users, who operate the mouse with the right
 hand, and keyboard with the left.</div>
</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setRubberBandColor()">setRubberBandColor</a>(rgb:uint):void</div>
<div class="summaryTableDescription">
 Change the color of the rubber band.</div>
</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setRubberBandThickness()">setRubberBandThickness</a>(pixels:int):void</div>
<div class="summaryTableDescription">
 Set the thickness, in pixels, of the rubber band.</div>
</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="RubberBandCtrl()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">RubberBandCtrl</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function RubberBandCtrl()</code><p>
 Creates an empty rubber band control object, which must be assigned to a Google Map via <code>enable ()</code>.
 
 </p><br>
<span class="label">Example</span>
<br>The following example shows how to assign a Google Map object to a RubberBandCtrl object:
 <div class='listing'><pre>
         :
     map.addEventListener (MapEvent.MAP_READY, onMapReady);
         :
 
 public function onMapReady (event:MapEvent):void
 {
     rbCtrl = new RubberBandCtrl ();
     rbCtrl.enable (map);
 }
 
 const map:Map = new Map ();
 var   rbCtrl:RubberBandCtrl = null;
 </pre></div>
 <p></p>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="disable()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">disable</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function disable():void</code><p>
 Remove RubberBandCtrl functionality from a Google Map.
 </p></div>
<a name="enable()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">enable</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function enable(googleMap:Map):void</code><p>
 Call this method once, ideally within the MapEvent.MAP_READY handler, to add
 RubberBandCtrl functionality to a Google Map.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">googleMap</span>:Map</code> &mdash; The map to receive RubberBandCtrl functionality.
 </td>
</tr>
</table>
</div>
<a name="setLeftHandedKeyCodes()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setLeftHandedKeyCodes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setLeftHandedKeyCodes():void</code><p>
 Set key codes for left handed users, who operate the mouse with the left
 hand, and keyboard with the right.
 </p></div>
<a name="setPanIncrement()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setPanIncrement</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setPanIncrement(pixels:int):void</code><p>
 Set the size, in pixels, for a keyboard initiated pan of the map.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">pixels</span>:int</code> &mdash; The number of pixels to pan vertically or horizontally, when the user performs a pan action. Setting this value to 0 disables panning.
 </td>
</tr>
</table>
</div>
<a name="setRightHandedKeyCodes()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setRightHandedKeyCodes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setRightHandedKeyCodes():void</code><p>
 Set key codes for right handed users, who operate the mouse with the right
 hand, and keyboard with the left.
 </p></div>
<a name="setRubberBandColor()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setRubberBandColor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setRubberBandColor(rgb:uint):void</code><p>
 Change the color of the rubber band.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">rgb</span>:uint</code> &mdash; A hexadecimal color value of the rubber band; for example, red is 0xFF0000, green is 0x00FF00 and blue is 0x0000FF.
 </td>
</tr>
</table>
</div>
<a name="setRubberBandThickness()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setRubberBandThickness</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setRubberBandThickness(pixels:int):void</code><p>
 Set the thickness, in pixels, of the rubber band.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">pixels</span>:int</code> &mdash; The thickness of the rubber band, in pixels.
 </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
